const Mock =require('mockjs');
const Random = Mock.Random;

function getQuestionList(opt = {} ) {
    const {len = 10, isStar=false, isDeleted=false} = opt;
    const list = [];
    console.log('getQuestionList', len, isStar, isDeleted);
    for(let i=0; i<len; i++){
        list.push({
            id: Random.id(),
            title: Random.ctitle(),
            isPublished: Random.boolean(),
            isStar,
            answerCount: Random.natural(50,100),
            createdAt: Random.datetime(),
            isDeleted,
        });
    }
    return list;
}


module.exports = getQuestionList;